package goods

import (
	"Web-Shop/controllers/base"
	"Web-Shop/models"
	"log"
)

type GoodsController struct {
	base.BaseController
}

func GoodsTypes(c *base.BaseController) []*models.GoodsType {
	var goodsTypes []*models.GoodsType
	goodsTypes, err := (&models.GoodsType{}).ReadGoodsTypes()
	if err != nil {
		log.Println(err)
	}
	c.Data["goodsTypes"] = goodsTypes
	return goodsTypes
}
